﻿<!DOCTYPE html>
<html>

<head>
    <!-- 必须的设置 -->
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
	<script src="js/mui.min.js"></script>
	<link href="css/mui.min.css" rel="stylesheet" />
	<script type="text/javascript" src="js/common.js"></script>
    <title>猪猪</title>
    <meta name="keywords" content="室内地图微信DEMO,易景地图,ESMap" />
    <meta name="description" content="室内地图微信DEMO,由易景室内三维地图引擎提供地图浏览、缩放、旋转、图层显隐、室内定位、室内导航、全景等基础功能"/>
    <link rel="shortcut icon" type="image/ico" href="../../../images/favicon.ico">
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <link href="css/common.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <link rel="stylesheet" type="text/css" href="css/alertLayer.css">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<link href="css/mui.min.css" rel="stylesheet" />
	<script type="text/javascript" charset="utf-8">
			function plusReady() {
				//console.log("h5plus Ready!!");
				setInterval(function() {
				plus.accelerometer.getCurrentAcceleration(function(a) {
					//console.log("x: " + a.xAxis + " y: " + a.yAxis + " z: " + a.zAxis);
//					var coord=app.getCoord();
//					console.log("waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
//					console.log(coord.x);
//					console.log(coord.y);
//					if(coord.x!=undefined){
//						drawPoint(coord.x,coord.y,1);
//						console.log("drawwwwwwwwwwwwwwwwwwwwww");
//					}
				}, function() {
					console.log("获取失败");
				})
			}, 1000);
			}
			mui.init();
			mui.plusReady(function() {
				console.log("mui plus ready!!");
			});
			if(window.plus) {
				plusReady();
				console.log("plus ready!!");
			} else {
				document.addEventListener("plusready", plusReady, false);
			}
			
		</script>
	</head>
<body>
    <div id="map-container">
    </div>
    <div class="searchButton-module" id="searchButton-module">
        <input type="text" disabled="disabled" placeholder="店铺/设施">
        <a class="close"></a>
    </div>

    <!--起点、终点 选择-->
    <div class="startEndPoint-module" id="startEndPoint-module">
        <div class="btn-back">
            <a class="btn"></a>
        </div>
        <div class="show-box">
            <div class="item-box start-box">
                <input type="text" placeholder="请选择起点位置" readonly="readonly" />
            </div>
            <div class="item-box end-box">
                <input type="text" placeholder="请选择终点位置" readonly="readonly" />
            </div>
        </div>
        <div class="btn-change">
            <a class="btn"></a>
        </div>
    </div>
    <!--导航结束-->
    <div class="navi-tip">
        <div>
            <div class="navi-dis">
                请保持手机平稳
            </div>
        </div>
    </div>
    <div class="floor-tip">
        <h4></h4>
        <div class="f-img">
        </div>
    </div>
    
    <div class="bottom-module">
        <!--poi 详情-->
        <div class="change-control poiInfo-control" id="poiInfo-control" style=" display: none;">
            <div class="close"></div>
            <div class="goBtn">到这去</div>
            <div class="info-box">
                <div class="p1">-</div>
            </div>
            <div class="btn-box">
                <a>
                    <!--返回-->
                </a>
                <a class="btn-start">设为起点</a>
                <a class="btn-end">设为终点</a>
            </div>
        </div>
        <!--开始导航-->
        <div class="change-control startNav-control off" id="startNav-control" style=" display: none;">
            <div class="info-box">
                <div class="p1">-
                </div>
                <div>
                    <span class="p2"></span>
                    <span class="p3"></span>
                </div>
            </div>
            <a class="anim-btn">模拟导航</a>
            <a class="end-btn">结束导航</a>
        </div>
    </div>
    <!--搜索页-->
    <div class="search-container">
        <div class="head-module" id="head-module">
            <div class="back-button"></div>
            <div class="box-control">
                <div class="floor-box">
                    <div id="floorNum" class="box" floor-id="">全部</div>
                    <ul id="floorlist" class="ul scrollStyle">
                    </ul>
                </div>
                <div class="input-box">
                    <input type="text" placeholder="店铺/设施">
                    <a class="close"></a>
                    <!-- <a class="submit">搜 索</a> -->
                </div>
            </div>
        </div>
        <div class="content-module">
            <!--设施-->
            <div class="facility-control" id="facility-control">
                <div class="box">
                    <div class="item-box itemBtn" data-cid="62">
                        <img src="images/search/dianti.jpg" class="disabled">
                        <span class="disabled">电梯</span>
                    </div>
                    <div class="item-box itemBtn" data-cid="61">
                        <img src="images/search/futi.jpg" class="disabled">
                        <span class="disabled">扶梯</span>
                    </div>
                    <div class="item-box itemBtn" data-cid="56">
                        <img src="images/search/manwc.jpg" class="disabled">
                        <span class="disabled">卫生间</span>
                    </div>
                    <div class="item-box itemBtn" data-cid="60">
                        <img src="images/search/louti.jpg" class="disabled">
                        <span class="disabled">楼梯</span>
                    </div>
                </div>
                <div class="moveBtn"></div>
            </div>
            <!--搜索结果-->
            <div class="sResult-control" id="sResult-control" style=" display: none;">
                <ul></ul>
                <p class="tips">-</p>
            </div>
            <!--历史记录-->
            <div class="sHistory-control" id="sHistory-control">
                <ul class="list"></ul>
                <div class="empty-btn">您暂未搜索任何记录!</div>
            </div>
        </div>
    </div>
    <div class="viewmode-group">
        <img id="btn2D" class="btn-default" src="images/wedgets/2D.png" style="display: none;">
        <img id="btn3D" class="btn-default" src="images/wedgets/3D.png">
    	<img id="realdh" class="btn-default" src="images/wedgets/icon_09.png">
    	<img id="mytest" class="btn-default" src="images/wedgets/test.png" style="width: 40px; height: 40px;">
    </div>
    
    <script type="text/javascript" src="js/tools.js"></script>
    <script type="text/javascript" src="js/locate.js"></script>
    <script src="lib/esmap.min.js?v=11"></script>
    <script src="js/basemap.js?v=11"></script>
    <script type="text/javascript" src="js/domInit.js?v=11"></script>
    <script type="text/javascript" src="js/search.js?v=11"></script>
    <script type="text/javascript" src="js/nav.js?v=11"></script>
</body>
<script src="js/mui.min.js"></script>
<script type="text/javascript">
	mapDowork();
	mui.init();
	
    //二维码测试
    var myscantest = document.getElementById("mytest");
    //点击扫一扫，跳转页面，开始扫描二维码
    myscantest.addEventListener("tap", function(){
		console.log("scan");
		mui.openWindow("scan.html","scan.html");
	}, { passive: false });
//		$("#mytest").click(function(){
//			var poiInfo={};
//			poiInfo.x=12636763.9341173;
//	        poiInfo.y=2539335.3432394;
//	        poiInfo.fnum=1;
//	        poiInfo.FloorName="F1";
//	        poiInfo.name="F1-房间2";
//	
//			drawPoint(poiInfo.x, poiInfo.y, poiInfo.fnum);
//			map.changeFocusFloor(poiInfo.fnum);
//			map.moveTo({
//				x: Number(poiInfo.x),
//				y: Number(poiInfo.y),
//				FloorNum: poiInfo.fnum,
//				time: 0.5
//			});
//			//显示下面的设置起点与终点
//			showNavDiv(poiInfo);
//		});
	//获取上一个页面传入的对象,并且本页面响应的dom赋值初始化
	mui.plusReady(function(){
	var currnetWebview = plus.webview.currentWebview();
	var searchRoom = currnetWebview.searchRoom;
	if(searchRoom != null && searchRoom != "" && searchRoom != undefined){
		console.log(JSON.stringify(searchRoom));
//		$("#mytest").click(function(){
			var poiInfo={};
			poiInfo.x=searchRoom.x;
	        poiInfo.y=searchRoom.y;
	        poiInfo.fnum=searchRoom.fnum;
	        poiInfo.FloorName=searchRoom.floorName;
	        poiInfo.name=searchRoom.name;
	
			drawPoint(poiInfo.x, poiInfo.y, poiInfo.fnum);
			map.changeFocusFloor(poiInfo.fnum);
			map.moveTo({
				x: Number(poiInfo.x),
				y: Number(poiInfo.y),
				FloorNum: poiInfo.fnum,
				time: 0.5
			});
			//显示下面的设置起点与终点
			showNavDiv(poiInfo);
//		});
	}else{
		console.log("searchRoom is null...");
	}
});
</script>

</html>